package com.amiu.autoMybatis;

import java.lang.reflect.Method;

import net.sf.cglib.proxy.Callback;
import net.sf.cglib.proxy.Enhancer;

import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;


public class SqlSessionProxy implements MethodInterceptor{

	@SuppressWarnings("unchecked")
	public <T> T getProxy(Class<T> cls) {
       return (T) Enhancer.create(cls, (Callback)SqlSessionProxy.this);
    }
	
	@Override
	public Object intercept(Object obj, Method method, Object[] args,
			MethodProxy proxy) throws Throwable {
		// TODO Auto-generated method stub
		return null;
	}
	
}
